<? 
	$title="User List"; 
	$pageid="4";
	$accessid=",a10,";

	require("required/dbconnect.php"); 
	require("required/header.php");
	require("required/function.php");

	$get_news=mysql_query("select * from os_checkthisout where type=0 order by create_date desc");
	
	
?>
<table width="100%"  cellpadding="0" cellspacing="5" height="300">
<tr>
	<td valign="top">
		<strong>Check This Out! Management</strong><br>
			<table width="100%" class="solidborder">
				<tr style="background-image: url(images/tbl_th.png);color:#FFFFFF" align="center" height="20">
					<td width="3%">No</td><td width="35%">Title </td><td width="10%">Create Date</td><td width="7%">Show</td><td width="11%">Action</td>
				</tr>
				<? if(mysql_num_rows($get_news)==0){ ?>
				<tr valign="top">
					<td align="center" colspan="7">
					- No record found - 
					</td>
				
				<? 
					}
					else
					{
						$no=1;
						while($a=mysql_fetch_array($get_news,MYSQL_ASSOC))
						{
							$enid=en_id($a['id']);
							if($no%2==0)
							{
								$bgcolor="#e5e5e5";
							}
							else
							{
								$bgcolor="#eeeeee";	
							}
							
							if($a['status']==0)
							{
								$status="No";
							}
							else
							{
								$status="Yes";	
							}
							
							
				?>
			  <tr height="20" valign="top" bgcolor="<?= $bgcolor ?>" onmouseover="this.style.backgroundColor='ccccff'" onmouseout="this.style.backgroundColor='<?= $bgcolor ?>'">
						<td align="center"><?= $no ?></td>
						<td>
						<?= $a['title_eng'] ?><br><a href="<?= $a['url_eng'] ?>" target="_blank"><?= $a['url_eng'] ?></a><br>
						
						</td>
							
						<td><?= $a['create_date'] ?></td>
						<td><?= $status ?></td>
						<td align="center"><a href="cto_edit.php?id=<?= $enid ?>">Edit</a> | <a href="cto_delete.php?id=<?= $enid ?>">Delete</a></td>								
			  </tr>
				<? 
					$no++; 
						}
					}
				?>
				
			</table>
			
		<table>
			
			<tr>
				<td colspan="3"><input type="button" value="Add New Record" class="button" onClick="window.open('cto_add.php','_self')"></td>
			</tr>
		</table>
		
		
		</td>
	</tr>
	
	
</table>
<? require("required/footer.php"); ?>

